<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script language="javascript">
	function showdata(t)
	{
		if($("#ids"+t).is(":hidden")){
			$("#ids"+t).show();
		}else{
			$("#ids"+t).hide();
		}
	
	}
</script>
<title>店铺报表</title>
<body class="withvernav">
<div class="bodywrapper"> {{include file='/public/leftmenu.tpl'}}
  <div class="centercontent">
    <div class="pageheader notab">
      <h1 class="pagetitle">店铺毛利报表</h1>
      <span class="pagedesc"></span>
      <div class="menulist">
        <ul class="profile_summary">
          <li class="current"></li>
        </ul>
      </div>
    </div>
    <!--pageheader-->
    
    <div id="contentwrapper" class="contentwrapper">
      <div id="basicform" class="subcontent">
        <form class="stdform stdform2"  id="theFrom" method="post" action="/oversea/savecompare">
        
         <div class="contenttitle2">
            <h3>店铺信息</h3>
            <small>时间：{{$starttime}}到{{$endtime}}</small>
          </div>
             <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
            <thead>
              <tr>
                <th class="head1">店铺名称</th>
                <th class="head1">总收入</th>
                <th class="head1">成本</th>
                <th class="head1">毛利 <img src="/fuman/images/icons/alert.png" title="毛利=订单总收入-商品成本-运费-交易费-平台使用费"></th>
                <th class="head1">毛利率</th>
              </tr>
            </thead>
            <tbody>
            
           {{foreach from=$newlist item=res key=key}}
            <tr>
              <td class="head1">{{$key}}</td>
              <td class="head0">{{$res.totalst}}</td>
              <td class="center">{{$res.cb}}</td>
              <td class="center">{{$res.maol}}</td>
              <td class="center">{{$res.maolv}}%</td>
            {{/foreach}}
            </tr>
              </tbody>
            
          </table>
          
          
         
          <br>
          <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
            <colgroup>
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            </colgroup>
            <thead>
              <tr>
                <th class="head0">订单号</th>
                <th class="head1">订单收入金额</th>
                <th class="head0">运费</th>
                <th class="head1">商品成本</th>
                <th class="head0">交易费用</th>
                <th class="head0">平台使用费</th>
                <th class="head0">单笔利润</th>
              </tr>
            </thead>
           
            
            {{foreach from=$orderlist item=detail key=key}}
            	 
            <tr>
            <td colspan="7" onClick="showdata('{{$key}}')"><h4>{{$key}}</h4></td>
            </tr>
            <tbody style="display:none" id="ids{{$key}}">
             {{foreach from=$detail item=li key=key}}
            <tr>
              <td>{{$li.ORDERID}}&nbsp;&nbsp;&nbsp;<a href="http://192.168.1.88:90/eshop/order.do?method=edit&orderid={{$li.ORDERID}}" target="_blank"><img src="/fuman/images/icons/attachment.png"></a></td>
              <td>{{$li.allmount}}</td>
              <td>{{$li.freight}}</td>
              <td>{{if $li.Costofgoods>0}}{{$li.Costofgoods}}{{else}}<font color="red">{{$li.Costofgoods}}</font>{{/if}}</td>
              <td>{{$li.PAYPALFEEAMOUNT}}</td>
               <td>{{$li.FINALVALUEFEE}}</td>
               <td>{{if $li.lastprice>0}}{{$li.lastprice}}{{else}}<font color="red">{{$li.lastprice}}</font>{{/if}}</td>
            </tr>
             {{/foreach}}
            </tbody>
            {{/foreach}}
           
            
          </table>
         
        </form>
        <br />
      </div>
      <!--subcontent--> 
      
      <!--subcontent--> 
      
    </div>
    <!--contentwrapper--> 
    
  </div>
  <!-- centercontent --> 
  
</div>

</body>
</html>